<%@ page import="examination.InvigilatorBean" %>
<%@ page import="examination.ExamBean" %>
<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>考试审核</title>
    <link rel="stylesheet" href="layui/css/layui.css">
    <script src="layui/layui.js"></script>
</head>
<body>
<%
    request.setCharacterEncoding("UTF-8");
    String examNo = request.getParameter("examNo");
    ExamBean exam = ExamBean.queryByNo(examNo);
    String applyName = InvigilatorBean.queryByNo(exam.getApplierNo()).getName();
%>

<table class="layui-table">
    <tr>
        <th>考试编号</th>
        <td><%= exam.getExamNo() %></td>
        <td></td>
    </tr>
    <tr>
        <th>申请人</th>
        <td><%= applyName %></td>
        <td><a href="invigilation_detail.jsp?staffNo=<%=exam.getApplierNo() %>" class="layui-btn layui-btn-xs" lay-event="edit">查看他的监考</a></td>
    </tr>
    <tr>
        <th>申请时间</th>
        <td><%= exam.getApplyDate() %></td>
    </tr>
    <tr>
        <th>学院</th>
        <td><%= exam.getCollegeName() %></td>
        <td></td>
    </tr>
    <tr>
        <th>课程名</th>
        <td><%= exam.getCourseName() %></td>
        <td></td>
    </tr>
    <tr>
        <th>考试时间</th>
        <td><%= exam.getDate() + " " + exam.getTime() %></td>
        <td></td>
    </tr>
    <tr>
        <th>考试地点</th>
        <td><%= exam.getLocation() %></td>
        <td></td>
    </tr>
    <tr>
        <th>所需监考老师</th>
        <td><%= exam.getNeed() %></td>
        <td></td>
    </tr>
    <tr>
        <th>监考工分</th>
        <td><%= exam.getWorkload() %></td>
        <td></td>
    </tr>
    <tr>
        <th>参考班级</th>
        <td><%= String.join(" ", exam.getClassNo())%></td>
        <td></td>
    </tr>>
    <tr>
        <th>考试备注</th>
        <td colspan="2"><%= exam.getComment() %></td>
    </tr>
</table>



<form action="AuditServlet" method="post">
    驳回理由：
    <textarea rows="5" cols="100" name="refuseReason"></textarea><br/>
	<input type="hidden" name="examNo" value="<%=exam.getExamNo()%>"/>
	<input type="hidden" name="audit" value="false"/>
    <input class="layui-btn" type="submit" value="拒绝申请"/>
</form>
<form action="AuditServlet" method="post">
	<input type="hidden" name="examNo" value="<%=exam.getExamNo()%>"/>
	<input type="hidden" name="audit" value="true"/>
    <input class="layui-btn" type="submit" value="通过申请"/>
</form>


</body>
</html>